package com.kjs.common.tools;

/**
 * @author xuedingjiexueergou@gmail.com
 * @date 2018/10/15 9:29
 */
public class CodeUtil {
    /**
     * 取md5的特定位置的字符值
     * @param md5 md5字符串
     * @return 特定值
     */
    public static String code(String md5){
        StringBuilder sb = new StringBuilder(5);
        for (int i = 0; i < 5; ++ i){
            int pos = 2 << i;
            sb.append(md5.charAt(pos - 1));
        }
        return sb.toString();
    }
}